/**
 * Copyright (C) 2013 AirChina
 *
 * @description:
 * @version:v1.0.0
 */
package com.china.itapi.common;

import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;

import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
import com.typesafe.config.ConfigObject;
import com.typesafe.config.ConfigParseOptions;
import com.typesafe.config.ConfigResolveOptions;
import com.typesafe.config.ConfigSyntax;
import com.typesafe.config.ConfigValue;

/**
 * @Description:
 * @author:larry
 * @Created:2013-10-30上午11:02:03
 */
public class KeyConfig {
	private static Config config = ConfigFactory.load("key.conf", ConfigParseOptions.defaults().setSyntax(ConfigSyntax.CONF).setAllowMissing(false), ConfigResolveOptions.defaults()
			.setUseSystemEnvironment(false));
	
	public static String getAesKeyPassword(){
		return config.getString("aes.key.password");
	}
	
//	public static Map<String,String> getDefaultAirportMapping(){
//		Map<String,String> ret = new HashMap<String,String>();
//		ConfigObject obj = config.getObject("defaultAirportMapping");
//		for(Entry<String, ConfigValue> entry:obj.entrySet()){
//			ret.put(entry.getKey(), entry.getValue().unwrapped().toString());
//		}
//		return ret;
//	}
}
